package com.tedu.food.common.util;

import com.tedu.food.sys.entity.Member;
import org.apache.shiro.SecurityUtils;

public class ShiroUtils {

    public static String getUsername(){
        return getUser().getUsername();
    }

    public static Member getUser(){
        return (Member) SecurityUtils.getSubject().getPrincipal();
    }
}